package com.wgo.surveyModel.domain.server.ejb;
import org.hibernate.*;
import com.wgo.surveyModel.domain.server.ejb.VesselEjb;
 import com.wgo.surveyModel.domain.common.Vessel;
 import com.wgo.surveyModel.domain.server.ejb.StreamerEjb;
 import com.wgo.surveyModel.domain.common.Streamer;
 import com.wgo.surveyModel.domain.server.ejb.StreamerSectionEjb;
 import com.wgo.surveyModel.domain.common.StreamerSection;
 import com.wgo.surveyModel.domain.server.ejb.EquipmentEjb;
 import com.wgo.surveyModel.domain.common.Equipment;
 import com.wgo.surveyModel.domain.server.ejb.SensorEjb;
 import com.wgo.surveyModel.domain.common.Sensor;
 import com.wgo.surveyModel.domain.server.ejb.HydrophoneEjb;
 import com.wgo.surveyModel.domain.common.Hydrophone;
 import com.wgo.surveyModel.domain.server.ejb.IRMAEjb;
 import com.wgo.surveyModel.domain.common.IRMA;
 import com.wgo.surveyModel.domain.server.ejb.SurveyDefEjb;
 import com.wgo.surveyModel.domain.common.SurveyDef;
   
 public class DomainFactoryEjb
 {
   private Session session = null;
   
   public DomainFactoryEjb(Session session)
   {
     this.session = session;
   }
    public Vessel createVessel()
    {
     	return new VesselEjb();
    }
    
    public Streamer createStreamer()
    {
     	return new StreamerEjb();
    }
    
    public StreamerSection createStreamerSection()
    {
     	return new StreamerSectionEjb();
    }
    
    public Equipment createEquipment()
    {
     	return new EquipmentEjb();
    }
    
    public Sensor createSensor()
    {
     	return new SensorEjb();
    }
    
    public Hydrophone createHydrophone()
    {
     	return new HydrophoneEjb();
    }
    
    public IRMA createIRMA()
    {
     	return new IRMAEjb();
    }
    
    public SurveyDef createSurveyDef()
    {
     	return new SurveyDefEjb();
    }
    
    public Vessel findVessel(Long id)
    {
     	return (Vessel)session.load(VesselEjb.class,id);
    }
    
    public Streamer findStreamer(Long id)
    {
     	return (Streamer)session.load(StreamerEjb.class,id);
    }
    
    public StreamerSection findStreamerSection(Long id)
    {
     	return (StreamerSection)session.load(StreamerSectionEjb.class,id);
    }
    
    public Equipment findEquipment(Long id)
    {
     	return (Equipment)session.load(EquipmentEjb.class,id);
    }
    
    public Sensor findSensor(Long id)
    {
     	return (Sensor)session.load(SensorEjb.class,id);
    }
    
    public Hydrophone findHydrophone(Long id)
    {
     	return (Hydrophone)session.load(HydrophoneEjb.class,id);
    }
    
    public IRMA findIRMA(Long id)
    {
     	return (IRMA)session.load(IRMAEjb.class,id);
    }
    
    public SurveyDef findSurveyDef(Long id)
    {
     	return (SurveyDef)session.load(SurveyDefEjb.class,id);
    }
    
}
 